<!--<div class="container">
  <div class="row">
    <div class="col-md-6" style="padding: 10px">
      <form class="form-horizontal" role="form">
        <div class="form-group">
          <label for="user_name" class="col-sm-2 control-label">用户名</label>
          <div class="col-sm-10">
            <input type="text" class="form-control" id="user_name_input" placeholder="请输入用户登录名">
          </div>
        </div>
      </form>
    </div>
  </div>
</div>-->
<div class="container">
  <div class="row">
    <div class="col-md-6" style="padding: 10px; width: 60%">
      <form>
        <div class="form-group">
          <label>用户登录名</label>
          <input type="email" class="form-control" name="InputUserName" placeholder="用户登录名" [(ngModel)]="user.user_name">
        </div>
        <div class="form-group">
          <label for="InputUserRealName">用户名</label>
          <input type="email" class="form-control" name="InputUserRealName" placeholder="用户名字" [(ngModel)]="user.user_realname">
        </div>
        <div class="form-group">
          <label for="InputPassword">密码</label>
          <input type="password" class="form-control" name="InputPassword" placeholder="新用户请输入密码，旧用户不修改留空" [(ngModel)]="user.password">
        </div>
        <div class="form-group">
          <label class="ui-chkbox-label" for="UserRole">用户角色</label>
          <div><p-radioButton name="userRole" value="admin" label="管理员" [(ngModel)]="user.user_role"></p-radioButton></div>
          <div><p-radioButton name="userRole" value="user" label="用户" [(ngModel)]="user.user_role"></p-radioButton></div>
        </div>
        <div class="form-group">
          <label for="Active">用户有效: </label>
          <input type="checkbox" name="CheckBoxValid" [(ngModel)]="user.active">
        </div>
        <a><button pButton type="button" label="保存" class="ui-button-text" icon="fa-save" (click)="saveUser()"></button></a>
        <a><button pButton type="button" label="返回" class="ui-button-text" icon="fa-arrow-left" (click)="back()"></button></a>
      </form>
    </div>
    <div class="col-md-6" style="padding: 10px; width: 60%">
      <div class="control-group alert alert-danger alert-dismissable" [(ngStyle)]="errorStyle">
          <strong>{{errMsg}}</strong>
      </div>
      <div class="control-group alert alert-success alert-dismissable" [(ngStyle)]="successStyle">
        <strong>{{successMsg}}</strong>
    </div>
    </div>
  </div>
</div>